//
//  LGAddPatientInputView.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2023/12/8.
//

#import "LGAddPatientInputView.h"


@implementation LGAddPatientInputView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setShadoWithColor:@"#B3C5D9" offset:CGSizeMake(0, 2) opacity:0.15 radius:15];
        self.backgroundColor = [UIColor whiteColor];
        [self addSubview:self.titleLabel];
        [self addSubview:self.textView];
        [self.textView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(viewPix(42));
            make.left.equalTo(self).offset(viewPix(12));
            make.right.equalTo(self).offset(-viewPix(12));
            make.bottom.equalTo(self).offset(-viewPix(12));
        }];
    }
    return self;
}

-(UILabel *)titleLabel{
    if(!_titleLabel){
        _titleLabel = [UILabel lableWithText:@"备注" colorString:@"#333333" textFont:LGFont(16) textAlignment:NSTextAlignmentLeft lines:1];
        _titleLabel.frame = CGRectMake(viewPix(12), viewPix(12), viewPix(50), viewPix(22));
    }
    return _titleLabel;
}

-(LGCustomTextView *)textView{
    if(!_textView){
        _textView = [LGCustomTextView textViewWithPlaceHolder:@"请输入..." textColor:@"#333333" textFont:LGFont(15) textAlignment:NSTextAlignmentLeft keyboard:UIKeyboardTypeDefault];
        _textView.backgroundColor = [UIColor colorWithString:@"#FAFAFA"];
        _textView.layer.borderColor = [UIColor colorWithString:@"#E3E3E3"].CGColor;
        _textView.layer.borderWidth = 1;
        _textView.cornerRidus = 5;
        _textView.placeHolderColor = @"#999999";
        _textView.placeHolderFont = LGFont(14);
        _textView.maxCount = 100;
    }
    return _textView;
}

@end
